﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using You2V.LocalDBLayer;

namespace You2V.Data.Shared
{
	/// <summary>
	/// Gender apply to any human instance
	/// </summary>
	public enum Gender
	{
		Male = 0,
		Female = 1,
		NA = 2
	}


	/// <summary>
	/// Need to consider if we need a new Table
	/// </summary>
	public enum Nation
	{
 		Han = 1,     //汉族
		Zhuang = 2,  //壮族
		Dong = 3,    //侗族
		Hongyao = 4, //红瑶族
		Miao = 5,    //苗族
		Yao = 6,	 //瑶族
		Hui = 7,     //回族
		Shui = 8,	 //水族
		Maonan = 9  //毛南族
	}

	/// <summary>
	/// Address Data
	/// </summary>
	public class Address
	{
        public string AddressText { get; set; }
        public string PostCode { get; set; }
	}

    /// <summary>
    /// area
    /// </summary>
    public class Area
    {
        public string area { get; set; }      //地区id
        public string areaname { get; set; }    //地区名称

        public override string ToString()
        {
            return areaname;
        }
    }

	public class StudentActionEnum
	{
		public int actionid { get; set; }
		public string action { get; set; }
		public bool Status { get; set; }
		public bool ShowAccount { get; set; }
		public bool ShowedAsPrimary { get; set; }

		public override string ToString()
		{
			return action;
		}

		public static Dictionary<string, StudentActionEnum> items
		{
			get
			{
				if (_items == null)
				{
					refreshItemList();
				}
				return _items;
			}
		}
		private static Dictionary<string, StudentActionEnum> _items;
		public static void refreshItemList()
		{
			_items = new Dictionary<string, StudentActionEnum>();
			List<StudentActionEnum> _itemList = You2VDataDictionary.GetStudentAvaliableActionList();
			foreach (StudentActionEnum p in _itemList)
			{
				_items.Add(p.action, p);
			}
		}
	}


}

